package chap3;

import java.text.DecimalFormat;
import java.util.Random;

public class PP3_3_1 {
        public static void main(String[] args) {
            DecimalFormat decimalFormat = new DecimalFormat("000");
            DecimalFormat decimalFormat1 = new DecimalFormat("0000");
            Random random = new Random();

            int num = random.nextInt(8);
            int num1 = random.nextInt(8);
            int num2 = random.nextInt(8);
            int num3 = random.nextInt(656);
            int num4 = random.nextInt(10000);

            System.out.println("电话号码：" + num + num1 + num2 + "-" + decimalFormat.format(num3) + "-" + decimalFormat1.format(num4));
        }
    }
